package com.smart.lx.designPrinciples.lsp;

/**
 * 功能描述: <br>
 * 〈测试方法〉
 *
 * @since: 1.0.0
 * @Author:abc
 * @Date: 2019/4/6
 */
public class TestG {
    public static void resize(Rectangle  a) {

        while(a.getWidth()>=a.getHeight()){
            a.setHeight(a.getHeight()+1);
            System.out.println(
                 "宽"+a.getWidth()+"高"+a.getHeight()
            );
        }

    }

    public static void main(String[] args) {

        Rectangle o=new Rectangle();
        o.setWidth(20);
        o.setHeight(10);
        resize(o);
    }

}
